/*
 * AccountManager.java
 *
 * Distributed Systems: Project 2
 *
 */
package unimelb.distSystems.communications;

import unimelb.distSystems.communications.CORBA.*;


public class Player {
    private UserAccount account;
    private int selectedCar;
    private boolean login;
    private boolean mark;
    private boolean ready;

    public Player(){
    }

    public Player(UserAccount a){
        account = a;
        login = true;
        ready = false;
        mark = false;
        selectedCar = 0;
    }

    public ServicePlayer getServicePlayer(){
        ServicePlayer player = new ServicePlayer();
        player.user = account.getAccount();
        player.ready = ready;
        player.car = selectedCar;

        return player;
    }

    public UserAccount getAcount() {
        return account;
    }

    public void setAcount(UserAccount acount) {
        this.account = acount;
    }

    public boolean isLogin() {
        return login;
    }

    public void setLogin(boolean login) {
        this.login = login;
    }

    public boolean isReady() {
        return ready;
    }

    public void setReady(boolean ready) {
        this.ready = ready;
    }

    public int getSelectedCar() {
        return selectedCar;
    }

    public void setSelectedCar(int selectedCar) {
        this.selectedCar = selectedCar;
    }

    public boolean isMark() {
        return mark;
    }

    public void setMark(boolean mark) {
        this.mark = mark;
    }

}
